import App from './App'
import Api from './api.js';
import Http from    './utils/http.js';
import sunui from   './utils/sun.js';

import antiThrottling from '@/utils/antiThrottling.js';

import Mixin from '@/components/mescroll-uni/mescroll-mixins.js';
import MescrollBody from '@/components/mescroll-uni/mescroll-body.vue';
import MescrollUni from '@/components/mescroll-uni/mescroll-uni.vue';
import MescrollEmpty from '@/components/mescroll-uni/components/mescroll-empty.vue';
import jweixin from './utils/jweixin.js';


// import XLSX from 'xlsx';
import WebsocketTask from   './utils/socket1.js';


Vue.mixin(Mixin);
Vue.component('mescroll-uni', MescrollUni);
Vue.component('mescroll-body', MescrollBody);
Vue.component('mescroll-empty', MescrollEmpty);
Vue.prototype.$http =Http                      
Vue.prototype.$websocket = new WebsocketTask('wss://'+window.location.hostname+':2346')
// Vue.prototype.$websocket = new WebsocketTask('wss://dazi.zun01.cn:2346')
// Vue.prototype.$websocket = new WebsocketTask('wss://dazi.weijuyunke.cn:2346')
// Vue.prototype.$websocket = new WebsocketTask('ws://192.168.0.113:2346')
// Vue.prototype.$api = Api;

Vue.prototype.$wx = jweixin;
Vue.prototype.$api = Api.api;

Vue.prototype.$img = Api.img;




Vue.prototype.$sun = sunui;
Vue.prototype.$at = antiThrottling;
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'

const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif